package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpUserFeedBackDao;
import com.financing.platform.dto.UserFeedBackDTO;
import com.financing.platform.util.SqlName;

/**
 * 
 * @ClassName: FpUserFeedBackDaoImpl
 * @Description:
 * @author qiye
 * @date 2014年11月12日 下午5:19:28
 * 
 */
@Repository("fpUserFeedBackDaoImpl")
public class FpUserFeedBackDaoImpl extends BaseDaoImpl implements IFpUserFeedBackDao {

	@SuppressWarnings("unchecked")
	public List<UserFeedBackDTO> userFeedBackList() throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.userFeedBackList);
	}

	@SuppressWarnings("unchecked")
	public List<UserFeedBackDTO> userFeedBackList(UserFeedBackDTO userFeedBackDTO) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.userFeedBackList, userFeedBackDTO);
	}

	public int userFeedBackListCount() throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.userFeedBackListCount);
	}

	public int updateUserFeedBack(UserFeedBackDTO userFeedBack) throws SQLException {
		return this.sqlMapClient.update(SqlName.updateFeedBack, userFeedBack);
	}
}
